A complete list of shortcuts can be accessed within RStudio using ALT + SHIFT + K, or here.

Execution

Description Keystroke Gem
Run line or selection CTRL + ENTER
Run line (without moving cursor) ALT + ENTER
Run from beginning to line CTRL + ALT + B
Run from line to end CTRL + ALT + E

Editing

Description Keystroke Gem
Copy selection CTRL + C
Cut selection CTRL + X
Paste selection CTRL + V
Undo CTRL + Z
Comment selected lines CTRL + SHIFT + C
Copy selected lines ALT + SHIFT + /
Move selected lines ALT + /
Find CTRL + F

Selection

Description Keystroke Gem
Select all code CTRL + A
Select characters SHIFT + /
Select line SHIFT + /
Select word CTRL + SHIFT + /

Files

Description Keystroke Gem
Save file CTRL + S
Open file CTRL + O
New .R script CTRL + SHIFT + N

Misc

Description Keystroke Gem
Zoom In CTRL + SHIFT + +
Zoom Out CTRL + -

{rmarkdown}

Description Keystroke Gem
Insert an empty code chunk CTRL + ALT + I
knit a {rmarkdown} document CTRL + SHIFT + K
Build a {bookdown} document CTRL + SHIFT + B

{devtools}

Description Keystroke Gem
Create package documentation CTRL + SHIFT + D
Build a package CTRL + SHIFT + B

A complete list of shortcuts can be accessed within RStudio using OPTION + SHIFT + K, or here.

Execution

Description Keystroke Gem
Run line or selection CMD + ENTER
Run line (without moving cursor) OPTION + ENTER
Run from beginning to line CMD + OPTION + B
Run from line to end CMD + OPTION + E

Editing

Description Keystroke Gem
Copy selection CMD + C
Cut selection CMD + X
Paste selection CMD + V
Undo CMD + Z
Comment selected lines CMD + SHIFT + C
Copy selected lines CMD + OPTION + /
Move selected lines OPTION + /
Find CMD + F

Selection

Description Keystroke Gem
Select all code CMD + A
Select characters SHIFT + /
Select line SHIFT + /
Select word OPTION + SHIFT + /

Files

Description Keystroke Gem
Save file CMD + S
Open file CMD + O
New .R script CMD + SHIFT + N

Misc

Description Keystroke Gem
Zoom In ?? + ??
Zoom Out ?? + ??

{rmarkdown}

Description Keystroke Gem
Insert an empty code chunk CMD + SHIFT + I
knit a {rmarkdown} document CMD + SHIFT + K
Build a {bookdown} document CMD + SHIFT + B

{devtools}

Description Keystroke Gem
Create package documentation CMD + SHIFT + D
Build a package CMD + SHIFT + B


NOTES